<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人中心-基本资料</title>
    <div data-th-replace="~{fragment/common :: common}"></div>
</head>
<body>
<div data-th-replace="~{fragment/header :: header}"></div>
<div class="body-container container" style="margin-top: 20px">
    <div class="col-sm-2 my-nav">
        <ul data-th-replace="~{fragment/my-nav :: my-nav(activeUrl='my')}"></ul>
    </div>
    <div class="col-sm-10 my-content">
        <div class="panel panel-default">
            <!-- Default panel contents -->
            <div class="panel-heading">
                <h4>基本资料
                    <a class="btn btn-sm btn-primary" data-th-href="@{/my/info}">编 辑</a>
                    <a data-th-href="@{'/u/'+${user.username}}" target="_blank" style="float: right;font-size: 14px;line-height: 30px;color: #337AB7;">查看个人主页</a>
                </h4>
            </div>
            <div class="panel-body">
                <br>
                <div class="col-sm-6 col-lg-7" style="padding: 0">
                    <table class="table table-bordered table-responsive">
                        <tr>
                            <td width="30%" style="text-align: center">用  户  名</td>
                            <td><span data-th-text="${user.username}"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: center">昵    称</td>
                            <td><span data-th-text="${user.nickname}"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: center">性    别</td>
                            <td><span data-th-text="${user.gender}==1?'男':'女'"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: center">生    日</td>
                            <td><span data-th-text="${#calendars.format(user.birthday,'yyyy-MM-dd')}"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: center">手  机  号</td>
                            <td><span data-th-text="${user.mobile}"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: center">手机绑定于</td>
                            <td><span data-th-text="${#calendars.format(user.mobileBindTime,'yyyy-MM-dd HH:mm:ss')}"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center">邮  箱  号</td>
                            <td>
                                <span data-th-text="${user.email}"/>&emsp;&emsp;
                                <a data-th-href="@{/my/email}" data-th-if="${#strings.isEmpty(user.email)}"
                                   class="btn btn-xs btn-primary">绑定邮箱</a>
                                <a data-th-href="@{/my/email}" data-th-if="${not #strings.isEmpty(user.email)}"
                                   class="btn btn-xs btn-primary">修改</a>
                                <span style="color: green" data-th-text="${emailBindSuccessMsg}"></span>
                                <span style="color: red" data-th-text="${emailBindFailMsg}"></span>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center">邮箱绑定于</td>
                            <td><span data-th-text="${#calendars.format(user.emailBindTime,'yyyy-MM-dd HH:mm:ss')}"/>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center">注 册 时 间</td>
                            <td><span data-th-text="${#calendars.format(user.createTime,'yyyy-MM-dd HH:mm:ss')}"/></td>
                        </tr>
                        <tr>
                            <td style="text-align: center">上次修改于</td>
                            <td><span data-th-text="${#calendars.format(user.updateTime,'yyyy-MM-dd HH:mm:ss')}"/></td>
                        </tr>
                    </table>

                </div>
                <div class="col-sm-6 col-lg-5">
                    <div class="col-sm-12" style="height: 200px;">
                        <img class="img-responsive" style="max-height: 160px;margin: auto;" src="${user.face}"
                             data-th-src="@{${user.face}}">
                        <p style="color:red" data-th-text="${errorMsg}"></p>
                    </div>
                    <div class="col-sm-12" style="height:130px">
                        个性签名：<br><br>
                        <p>　　<U data-th-text="${user.signature}"/></p>
                    </div>
                    <!--<div class="col-sm-12" style="text-align: right"><a class="btn btn-primary" data-th-href="@{/my/info}">编 辑</a></div>-->
                </div>

            </div>


        </div>
    </div>
</div>
<div data-th-replace="~{fragment/footer :: footer}">...</div>
</body>
</html>